<apes-upload
  [apesShowButton]="true"
  [apesFileList]="fileList"
  [apesBeforeUpload]="beforeUpload"
  [apesPreview]="handlePreview"
  [apesRemove]="handleRemove"
  [apesShowUploadList]="handleShowList()">
  <button apes-button
          type="button"
          apes-tooltip
          [apesTitle]="showLimit()"
          [apesPlacement]="'top'"
          [apesLoading]="uploading"
          [apesType]="'primary'"
          [disabled]="disabled">
    <i apes-icon apesType="upload"></i>
    <span>选择文件</span>
  </button>
</apes-upload>

<!--图片预览-->
<!--<apes-modal [apesVisible]="previewVisible" [apesContent]="modalContent" [apesFooter]="null"-->
<!--            (apesOnCancel)="previewVisible=false">-->
<!--  <ng-template #modalContent>-->
<!--    <img [src]="previewImage" [ngStyle]="{ 'width': '100%' }"/>-->
<!--  </ng-template>-->
<!--</apes-modal>-->

<!--pdf预览-->
<apes-modal [apesVisible]="pdfPreview" apesWidth="50vw" [apesContent]="pdfContent" [apesFooter]="null"
            (apesOnCancel)="pdfPreview=false" [apesBodyStyle]="{height:'80vh'}" apesClosable="false">
  <ng-template #pdfContent>
    <embed [src]="preview" type="application/pdf"
           style="overflow: auto; position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%">
  </ng-template>
</apes-modal>


<!--<button apes-button [apesType]="'primary'" [apesLoading]="uploading" (click)="handleUpload()"-->
<!--[disabled]="fileList.length == 0 || disabled">-->
<!--<i apes-icon apesType="upload"></i>-->
<!--<span>{{ uploading ? '加载中' : '上传' }}</span>-->
<!--</button>-->
<ng-container *ngIf="showDownload && fileList.length != 0">
  <button apes-button [apesType]="'primary'" [disabled]="fileList.length == 0" (click)="handleDownload()">
    <i apes-icon apesType="download"></i><span>下载</span>
  </button>
</ng-container>
